import babel from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
export default {
    input: "./Editor/index.ts",
    output: [
        {
            file: `./dist/files.js`,
            format: "es",
            paths: {
                "@antv/x6": "https://cdn.skypack.dev/@antv/x6",
                "enum-color": "https://cdn.skypack.dev/enum-color",
                treeverse: "https://cdn.skypack.dev/treeverse",
                "browser-fs-access":
                    "https://cdn.skypack.dev/browser-fs-access",
                "@konghayao/blueshell":
                    "https://cdn.skypack.dev/@konghayao/blueshell/dist/lib/index.js",
                "@konghayao/blueshell/dist/lib/nodes/decorators":
                    "https://cdn.skypack.dev/@konghayao/blueshell/dist/lib/nodes/decorators/index.js",
            },
        },
    ],
    plugins: [
        babel({
            presets: ["@babel/typescript"],
            extensions: [".ts"],
            exclude: ["node_modules"],
            plugins: [
                // ["@babel/plugin-proposal-decorators", { legacy: true }],
                // ["@babel/plugin-proposal-class-properties", { loose: true }],
            ],
        }),
        commonjs({
            extensions: [".js", ".ts"],
        }),
    ],
};
